package com.xrit.text;

import com.xrit.factory.CarFactory;

import com.xrit.inter.Car;
import com.xrit.pojo.Benchi;
import org.junit.Test;

public class TestFactory {
   @Test
    public void t01(){
       Benchi benchi = (Benchi) CarFactory.createCar("Benchi");
       benchi.run();
   }
   @Test
    public void t02() throws Exception{
       Car car = CarFactory.getppp("com.xrit.pojo.Benchi");
       car.run();
    }
}
